<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE html>
<html xmlns="http://www.w3.org/1999/xhtml"
      xmlns:ui="http://java.sun.com/jsf/facelets"
      xmlns:p="http://primefaces.org/ui"
      xmlns:h="http://java.sun.com/jsf/html">

    <ui:composition id="login">
        <h:form>
            <p:growl id="gr_message" />
            <p:panel header="Login">
                <p:inputText id="login"
                             required="true" 
                             requiredMessage="Login invalido!" 
                             value="#{loginBean.login}"/>
                <p:watermark for="login" value="Login" /> 
                <p:password id="senha"
                            required="true"
                            requiredMessage="Senha Invalida!" 
                            value="#{loginBean.senha}" />
                <p:watermark for="senha" value="Senha" /> 
                <p:commandButton value="Entrar" update="gr_message" action="#{loginBean.validaLogin()}" ajax="false"/>
            </p:panel>
        </h:form>
    </ui:composition>
</html>
